
<?php $__env->startSection('content'); ?>

    <div class="admin-content">
        <div class="admin-content-body">
            <div class="am-cf am-padding am-padding-bottom-0">
                <div class="am-fl am-cf"><strong class="am-text-primary am-text-lg">囤票活动列表</strong> /
                    <small>List</small>
                </div>
            </div>
            <?php echo $__env->make('admin._flash', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
            <hr>

            <div class="am-g">
                <div class="am-u-sm-12 am-u-md-6">
                    <div class="am-btn-toolbar">
                        <div class="am-btn-group am-btn-group-s">
                            <a href="/admin/addHoarding" type="button" class="am-btn am-btn-default"><span
                                        class="am-icon-plus"></span> 新增</a>
                            
                            
                            


                        </div>
                    </div>
                </div>
            </div>

            <hr>


            <div class="am-g">
                <div class="am-u-sm-12">
                    <form class="am-form">
                        <table class="am-table am-table-striped am-table-hover table-main">
                            <thead>
                            <tr style="font-size: 1.6rem">
                                <th><input class="check_all" type="checkbox"></th>
                                <th class="table-id">ID</th>
                                <th class="table-thumb">特惠价</th>
                                <th class="table-type">折扣</th>
                                <th class="table-type">门票数量</th>
                                <th class="table-type">有效天数</th>
                                <th class="table-type">活动开始时间</th>
                                <th class="table-type">活动结束时间</th>
                                <th class="table-type">是否上架</th>
                                <th class="table-set">操作</th>
                            </tr>
                            </thead>
                            <tbody>
                            <?php $__currentLoopData = $hoardingArr; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $k=>$hoarding): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <tr data-id="" style="font-size: 1.6rem">
                                    <th><input class="checked_id" name="checked_id[]" value="" type="checkbox"></th>
                                    <td><?php echo e($k+1); ?></td>
                                    <td><?php echo e($hoarding->discount_price); ?>元</td>
                                    <td><?php echo e($hoarding->discount_ratio); ?>折</td>
                                    <td><?php echo e($hoarding->ticket_total); ?>张</td>
                                    <td><?php echo e($hoarding->days); ?>天</td>
                                    <td><?php echo e($hoarding->start_time); ?></td>
                                    <td><?php echo e($hoarding->end_time); ?></td>
                                    <td><?php if($hoarding->is_over==1): ?>是 <?php else: ?> 否 <?php endif; ?></td>
                                    <td>
                                        <div class="am-btn-toolbar">
                                            <div class="am-btn-group am-btn-group-xs">
                                                <a href="/admin/updateHoarding/<?php echo e($hoarding->id); ?>"
                                                   class="am-btn am-btn-primary am-btn-xs"><span
                                                            class="am-icon-pencil-square-o"></span> 编辑
                                                </a>
                                                <a href="/admin/deleteHoarding/<?php echo e($hoarding->id); ?>"
                                                   data-method="delete"
                                                   data-token="<?php echo e(csrf_token()); ?>" data-confirm="确认删除吗?"
                                                   class="am-btn am-btn-danger am-btn-xs del_one">
                                                    <span class="am-icon-trash-o"></span> 删除
                                                </a>
                                            </div>
                                        </div>
                                    </td>
                                </tr>

                                 <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                            </tbody>
                        </table>

                        <div class="am-cf">
                            <div class="am-fr">

                            </div>
                        </div>
                        <hr/>
                    </form>
                </div>

            </div>
        </div>

        <footer class="admin-content-footer">
            <hr>
            <p class="am-padding-left">© 2014 AllMobilize, Inc. Licensed under MIT license.</p>
        </footer>

    </div>


<?php $__env->stopSection(); ?>
<?php $__env->startSection('js'); ?>
    <script>
        $(function () {

            //改变性别
            $('.gx').click(function () {
                //   alert(111);

                var id = $(this).parents('tr').data('id');
// console.log(id);exit;
                var _this = $(this);
                $.ajax({
                    type: 'PATCH',
                    url: '/admin/recustomer/change_key',
                    data: {id: id},
                    success: function () {
                        // _this.toggleClass('am-icon-male am-icon-female');
                        location.href = location.href;

                    }
                })

            })

            $('.gxx').click(function () {
                //   alert(111);

                var id = $(this).parents('tr').data('id');
// console.log(id);exit;
                var _this = $(this);
                $.ajax({
                    type: 'PATCH',
                    url: '/admin/recustomer/sendSms',
                    data: {id: id},
                    success: function (res) {
                        // _this.toggleClass('am-icon-male am-icon-female');
                        if(res==1){
                            alert('发送成功')
                        }

                    }
                })

            })
        })
    </script>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.admin.application', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>